<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>Untitled Document</title>
	</head>
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/prototype/1.7.0.0/prototype.js" charset="UTF-8"></script>

<script type="text/javascript">
<!--

function testStoreResultStatic(){
    var form = document.createElement('form');
    document.body.appendChild(form);
	var input = document.createElement('input');	
    input.setAttribute( 'type' , 'hidden');
    input.setAttribute( 'name' , 'testName' );
    input.setAttribute( 'value' , 'storeResultStatic' );
    form.appendChild( input );

    var input = document.createElement('input');
    input.setAttribute( 'type' , 'hidden');
    input.setAttribute( 'name' , 'myID' );
    input.setAttribute( 'value' , '169835' );
    form.appendChild( input );

    var input = document.createElement('input');
    input.setAttribute( 'type' , 'hidden');
    input.setAttribute( 'name' , 'gender' );
    input.setAttribute( 'value' , 0 );
    form.appendChild( input );
		
	var input = document.createElement('input');
	var playerIDList = ["7972872","2239842","2474472","2474473","2474474"];
    input.setAttribute( 'type' , 'hidden');
    input.setAttribute( 'name' , 'playerIDList' );
    input.setAttribute( 'value' , Object.toJSON(playerIDList));
    form.appendChild( input );	
	
    form.setAttribute( 'action' , 'http://localhost:8080/request/updatestatic');
 //   form.setAttribute( 'action' , 'http://gykapp2.appspot.com/request/storeresult');
    form.setAttribute( 'method' , 'post' );
    form.submit();
}

function testStoreResult(){
    var form = document.createElement('form');
    document.body.appendChild(form);
	var input = document.createElement('input');	
    input.setAttribute( 'type' , 'hidden');
    input.setAttribute( 'name' , 'testName' );
    input.setAttribute( 'value' , 'storeResult' );
    form.appendChild( input );

    var input = document.createElement('input');
    input.setAttribute( 'type' , 'hidden');
    input.setAttribute( 'name' , 'myID' );
    input.setAttribute( 'value' , '169835' );
    form.appendChild( input );

    var input = document.createElement('input');
    input.setAttribute( 'type' , 'hidden');
    input.setAttribute( 'name' , 'gender' );
    input.setAttribute( 'value' , 0 );
    form.appendChild( input );
		
	var input = document.createElement('input');
	var fieldIDList = ["f0001","f1002","f2003"];
    input.setAttribute( 'type' , 'hidden');
    input.setAttribute( 'name' , 'fieldIDList' );
    input.setAttribute( 'value' , Object.toJSON(fieldIDList) );
	form.appendChild( input );
	
	var input = document.createElement('input');
	var fieldsList = {
		'f0001': {
			fieldTitle: "100m",
			fieldQuestion: "速いのは",
			fieldCategory: 0
		},
		'f1002': {
			fieldTitle: "フォークダンス",
			fieldQuestion: "上手いのは?",
			fieldCategory: 1
		},
		'f2003': {
			fieldTitle: "お弁当",
			fieldQuestion: "上手く作れそうなのは?",
			fieldCategory: 2
		}
	};
    input.setAttribute( 'type' , 'hidden');
    input.setAttribute( 'name' , 'fieldsList' );
    input.setAttribute( 'value' , Object.toJSON(fieldsList));
    form.appendChild( input );
	
	var input = document.createElement('input');
	var fullResultList = {
		'f0001': ["169835", "7972872", "2239842", "2474472",],
		'f1002': ["2474473", "2474474", "169835", "2474475"],
		'f2003': ["2474473", "7972872", "2474475","169835"]
	};
    input.setAttribute( 'type' , 'hidden');
    input.setAttribute( 'name' , 'fullResultList' );
    input.setAttribute( 'value' , Object.toJSON(fullResultList));
    form.appendChild( input );

	var input = document.createElement('input');
	var playerIDList = ["7972872","2239842","2474472","2474473","2474474"];
    input.setAttribute( 'type' , 'hidden');
    input.setAttribute( 'name' , 'playerIDList' );
    input.setAttribute( 'value' , Object.toJSON(playerIDList));
    form.appendChild( input );	
	
    form.setAttribute( 'action' , 'http://localhost:8080/request/storeresult');
 //   form.setAttribute( 'action' , 'http://gykapp2.appspot.com/request/storeresult');
    form.setAttribute( 'method' , 'post' );
    form.submit();
}

function testPlayerInfo(){
	var form = document.createElement('form');
    document.body.appendChild(form);
	var input = document.createElement('input');	
    input.setAttribute( 'type' , 'hidden');
    input.setAttribute( 'name' , 'testName' );
    input.setAttribute( 'value' , 'playerInfo' );
    form.appendChild( input );

    var input = document.createElement('input');
    input.setAttribute( 'type' , 'hidden');
    input.setAttribute( 'name' , 'myID' );
    input.setAttribute( 'value' , '169835' );
    form.appendChild( input );

    var input = document.createElement('input');
    input.setAttribute( 'type' , 'hidden');
    input.setAttribute( 'name' , 'gender' );
    input.setAttribute( 'value' , 0 );
    form.appendChild( input );
	
	var input = document.createElement('input');
    input.setAttribute( 'type' , 'hidden');
    input.setAttribute( 'name' , 'friendsNum');
    input.setAttribute( 'value' , 24 );
    form.appendChild( input );

    form.setAttribute( 'action' , 'http://localhost:8080/request/playerinfo');
    form.setAttribute( 'method' , 'post' );
    form.submit();
}

</script>	
        <body>

<input type="button" value="StoreResultStaticテスト" onClick="JavaScript:testStoreResultStatic()" />			      
<input type="button" value="StoreResultテスト" onClick="JavaScript:testStoreResult()" />			
<input type="button" value="PlayerInfoテスト" onClick="JavaScript:testPlayerInfo()" />
<a href=“JavaScript:submitForm()”>クリックしたら値“bar”をPOST送信</a>
<!-- <img src="http://chart.apis.google.com/chart?cht=r&amp;chs=200x200&amp;chls=3,0,0&amp;chxt=x,y&amp;chxl=0:|瞬発力|恋愛運|金銭運|知力|持久力|1:|||||&amp;chm=B,FF990080,0,0,5&amp;chd=t:80,20,30,50,60,80" /> -->


        </body>
      
</html>
